/*
 * @Author: SuperficialL
 * @Date: 2020-06-03 22:45:43
 * @LastEditTime: 2021-02-22 12:22:42
 * @Description: gravatar通过邮箱获取头像
 */
import gravatar from "gravatar";
import APP_CONFIG from "@/config/app.config";

export const getBannerArticleThumbnailUrl = (thumb, isMobile, isWebPImage) => {
    if (!thumb) {
        return "/images/thumb/pc-carousel.jpg";
    }
}

export const getGravatarByEmail = email => {
    let avatar =  gravatar.url(email, { protocol: "https" });
    avatar = avatar.replace("https://s.gravatar.com/avatar", APP_CONFIG.GRAVATAR);
    avatar += `?x-oss-process=style/gravatar`;
    return avatar;
}